<template>
  <div class="my_pk">
    <div class="my_pk_header">
      <span>PK列表</span>
    </div>
    <div class="my_pk_school">
      <div class="my_px_school_name">
        <div class="school_list" v-for="item in 10" :key="item">
          <el-checkbox-group v-model="form.type">
            <el-checkbox name="type" :label="item"></el-checkbox>
          </el-checkbox-group>

          <img src="@/assets/img/timg.jpg" alt />
          <h4 class="ctyl">北京市</h4>
          <h3 class="school_name">北京大学</h3>
        </div>
      </div>
      <div class="my_px_bottom">
        <div v-if="form.type == ''">
          <el-button type="info" disabled>开始 PK</el-button>
          <el-button type="info" disabled>删除</el-button>
        </div>
        <div v-else>
          <router-link
           :to="{
             name: '/PKDetails',
            params: {
              tyle: form.type
            }
          }"
          tag="span"
          ><el-button type="primary">开始 PK</el-button></router-link>
          
          <el-button type="danger">删除</el-button>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "MyPK",
  data() {
    return {
      form: {
        type: []
      }
    };
  }
};
</script>
<style lang="scss" >
.my_pk {
  .my_pk_header {
    width: 100%;
    border-radius: 10px;
    background: #ffffff;
    font-size: 16px;
    height: 72px;
    line-height: 72px;
    box-sizing: border-box;
    padding: 0 10px;
    display: flex;
    span {
      cursor: pointer;
      height: 72px;
      line-height: 72px;
      padding: 0 24px;
      color: #757575;
      display: block;
    }
    .router-link-active {
      color: #414141;
    }
  }
  .my_pk_school {
    overflow: hidden;
    margin-top: 24px;
    height: 800px;
    position: relative;
    .my_px_school_name {
      display: flex;
      justify-content: space-between;
      flex-wrap: wrap;
      height: 800px;
      overflow-y: auto;
      padding-right: 10px;
      .el-checkbox__inner {
        border-radius: 50%;
        position: relative;
        top: 32px;
        left: 32px;
        padding: 8px;
      }
      .el-checkbox__inner::after {
        top: 4px;
        left: 6px;
      }
      .el-checkbox__label {
        display: none;
      }
      .school_list {
        width: 260px;
        height: 300px;
        border-radius: 10px;
        background: #ffffff;
        margin-top: 24px;
        img {
          display: block;
          width: 76px;
          height: 76px;
          margin: 0 auto;
          padding-top: 50px;
          padding-bottom: 40px;
        }
        .ctyl {
          text-align: center;
          font-size: 20px;
          color: #757575;
          padding-bottom: 24px;
        }
        .school_name {
          font-size: 24px;
          color: #515151;
          text-align: center;
        }
      }
    }
    .my_px_school_name::-webkit-scrollbar-thumb {
      border-radius: 10px;
      -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3);
      background-color: #d0cece;
    }
    .my_px_school_name::-webkit-scrollbar {
      width: 6px;
      height: 16px;
    }
    .my_px_bottom {
      position: absolute;
      z-index: 1;
      width: 94%;
      bottom: 2px;
      margin: 0 auto;
      left: 4px;
      padding: 20px;
      border-radius: 10px 10px 0 0;
      background: #ffffff;
      box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3), 0 0 6px rgba(0, 0, 0, 0.04);
      .el-button {
        margin-left: 20px;
      }
    }
  }
}
</style>